<template>
	<view v-if="lefticon"> <uni-nav-bar @clickLeft="back" :left-icon="lefticon"   :border="false" :title="title"
			:fixed="true" :statusBar="true" /></view>
	<view v-else><uni-nav-bar :left-icon="lefticon" :title="title" :fixed="true" :border="false" :statusBar="true" />
	</view>
</template>
<script>
	// 头部导航
	import uniNavBar from "/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue"
	export default {
		components: {
			uniNavBar
		},
		props: {
			title: '',
			lefticon: '',
		},
		data() {
			return {

			}
		},
		onload() {
			var pages = getCurrentPages();
			var page = pages[pages.length - 1];
			console.log(page.route);
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				})
			},
		}
	}
</script>